<?php


class EBookAdapter implements BookInterface
{

    private $ebook;
    /**
     * @return mixed
     */
    public function __construct(EBookInterface $EBook)
    {
        $this->ebook = $EBook;
    }

    /**
     * @return mixed
     */
    public function open()
    {
        $this->ebook->unlock();
    }


    public function turnPage()
    {
        $this->ebook->pressNext();
    }

    public function getPage()
    {
        return $this->ebook->getPage()[0];
    }
}